import {ReactNode} from "react";
import Home from "./home";
import UserList from "../iteration/userListe";
import UserDetail from "../iteration/userDetail";
import User from "./user";

interface IRouter {
    id : number
    path: string
    title : string
    component ?: ReactNode
    exact ?: boolean
    childern?: IRouter[]
}

export const router:IRouter[] = [
    {
        id:1,
        path: '/',
        title:"index page",
        component:() =>(<Home/>)
},{
        id:2,
        path: '/user',
        title:"user list",
        component:()=>(<User/>),
        childern: [
            {
                id:3,
                path: '/user/detail',
                title:"userdetail",
                component:() =>(<UserDetail/>)
            }
        ]
    }
]
